/*
 * 由于同一个Iframe不能在多个地方同时使用，
 * 不然postMessage会报错，原因不明，
 * 所以每个用到Iframe的地方都要自己定义一个专用的
 */
//用于编辑测试需求的editorIframe
var testRequirementEditorIFrame = Ext.create("Ext.ux.IFrame", {
    frameName: 'testRequirementEditorIFrame',
    src: zuulUrl+'/'+webServiceName+'/editor',
    autoRender: true,
    listeners: [{
        afterrender: function () {
            console.log('afterrender');
        },
        activate: function () {
            console.log('activate');
        },
        added: function () {
            console.log('added');
        },
        afterlayoutanimation: function () {
            console.log('afterlayoutanimation');
        },
        beforeactivate: function () {
            console.log('beforeactivate');
        },
        beforedeactivate: function () {
            console.log('beforedeactivate ');
        },
        beforedestroy: function () {
            console.log('beforedestroy');
        },
        beforehide: function () {
            console.log('beforehide');
        },
        beforerender: function () {
            console.log('beforerender');
        },
        beforeshow: function () {
            console.log('beforeshow ');
        },
        beforestaterestore: function () {
            console.log('beforestaterestore');
        },
        beforestatesave: function () {
            console.log('beforestatesave');
        },
        blur: function () {
            console.log('blur');
        },
        boxready: function () {
            console.log('boxready');
        },
        destroy: function () {
            console.log('destroy');
        },
        disable: function () {
            console.log('disable');
        },
        enable: function () {
            console.log('enable');
        },
        focus: function () {
            console.log('focus');
        },
        focusenter: function () {
            console.log('focusenter');
        },
        hide: function () {
            console.log('hide');
        },
        move: function () {
            console.log('move');
        },
        removed: function () {
            console.log('removed');
        },
        render: function () {
            console.log('testRequirementEditorIFrameRender');
        },
        show: function () {
            console.log('show');
        },
        staterestore: function () {
            console.log('staterestore');
        },
        statesave: function () {
            console.log('statesave');
        }
    }]
});

////用于查看已经完成的测试需求审核的editorIframe
//var testRequirementCheckEditorIFrame = Ext.create("Ext.ux.IFrame", {
//    frameName: 'testRequirementCheckEditorIFrame',
//    src: zuulUrl+'/'+webEditorServiceName+'/index.html',
//    autoRender: true,
//    listeners: [{
//        added: function () {
//            console.log('added');
//        },
//        removed: function () {
//            console.log('removed');
//        },
//        render: function () {
//            console.log('testRequirementCheckEditorIFrameRender');
//        }
//    }]
//});

//用于编辑测试步骤的editorIframe
var testDesignStepEditorIFrame = Ext.create("Ext.ux.IFrame", {
    frameName: 'testDesignStepEditorIFrame',
    src: zuulUrl+'/'+webServiceName+'/editor',
    autoRender: true,
    listeners: [{
        added: function () {
            console.log('added');
        },
        removed: function () {
            console.log('removed');
        },
        render: function () {
            console.log('testDesignStepEditorIFrameRender');
        }
    }]
});

//用于编辑测试执行记录的步骤的结果理由的editorIframe
var testRunStepReasonEditorIFrame = Ext.create("Ext.ux.IFrame", {
    frameName: 'testRunStepReasonEditorIFrame',
    src: zuulUrl+'/'+webServiceName+'/editor',
    autoRender: true,
    listeners: [{
        added: function () {
            console.log('added');
        },
        removed: function () {
            console.log('removed');
        },
        render: function () {
            console.log('testRunStepReasonEditorIFrameRender');
        }
    }]
});
